package com.efounder.mobilecomps.contacts;

import java.util.Comparator;

public class PinyinComparator implements Comparator<User> {

	@Override
	public int compare(User o1, User o2) {//☆--# 升序
		if  (o1.getSortLetters().equals(o2.getSortLetters()) ) {//恒小于
			return 0;
		}
		if (o1.getSortLetters().equals("↑") ) {//恒小于
			return -1;
		}else if (o2.getSortLetters().equals("↑")) {//恒大于
			return 1;
		}else if (o1.getSortLetters().equals("☆") || o2.getSortLetters().equals("#")) {
			return -1;
		} else if (o1.getSortLetters().equals("#") || o2.getSortLetters().equals("☆")) {
			return 1;
		} else {
			return o1.getSortLetters().compareTo(o2.getSortLetters());
		}
		
	}

}
